<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"> <?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <div class="page-header">
    <h1><?php echo $heading_title; ?></h1>
  </div>
  <p><?php echo $text_account_already; ?></p>
  <form class="form-horizontal" action="<?php echo $action; ?>" method="post" enctype="multipart/form-data">
    <!-- 个人资料 -->
    <fieldset>
      <legend> <?php echo $text_your_details; ?></legend>
      <div class="control-group">
        <label class="control-label"><span class="required">*</span> <?php echo $entry_firstname; ?></label>
        <div class="controls">
          <input class="span2" type="text" name="firstname" value="<?php echo $firstname; ?>" />
          <?php if ($error_firstname) { ?>
          <span class="error"><?php echo $error_firstname; ?></span>
          <?php } ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"><span class="required">*</span> <?php echo $entry_lastname; ?></label>
        <div class="controls">
          <input class="span1" type="text" name="lastname" value="<?php echo $lastname; ?>" />
          <?php if ($error_lastname) { ?>
          <span class="error"><?php echo $error_lastname; ?></span>
          <?php } ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"><span class="required">*</span> <?php echo $entry_email; ?></label>
        <div class="controls">
          <input type="text" name="email" value="<?php echo $email; ?>" />
          <?php if ($error_email) { ?>
          <span class="error"><?php echo $error_email; ?></span>
          <?php } ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"><span class="required">*</span> <?php echo $entry_telephone; ?></label>
        <div class="controls">
          <input type="text" name="telephone" value="<?php echo $telephone; ?>" />
          <?php if ($error_telephone) { ?>
          <span class="error"><?php echo $error_telephone; ?></span>
          <?php } ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"> <?php echo $entry_fax; ?></label>
        <div class="controls">
          <input type="text" name="fax" value="<?php echo $fax; ?>" />
        </div>
      </div>
    </fieldset>
    
    <!-- 详细地址 -->
    <fieldset>
      <legend> <?php echo $text_your_address; ?></legend>
      <div class="control-group">
        <label class="control-label"> <?php echo $entry_company; ?></label>
        <div class="controls">
          <input type="text" name="company" value="<?php echo $company; ?>" />
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"> <span class="required">*</span> <?php echo $entry_address_1; ?></label>
        <div class="controls">
          <input type="text" name="address_1" value="<?php echo $address_1; ?>" />
          <?php if ($error_address_1) { ?>
          <span class="error"><?php echo $error_address_1; ?></span>
          <?php } ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"> <?php echo $entry_address_2; ?></label>
        <div class="controls">
          <input type="text" name="address_2" value="<?php echo $address_2; ?>" />
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"> <span class="required">*</span> <?php echo $entry_city; ?></label>
        <div class="controls">
          <input class="span2" type="text" name="city" value="<?php echo $city; ?>" />
          <?php if ($error_city) { ?>
          <span class="error"><?php echo $error_city; ?></span>
          <?php } ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"> <span class="required">*</span> <?php echo $entry_postcode; ?></label>
        <div class="controls">
          <input class="span1" type="text" name="postcode" value="<?php echo $postcode; ?>" />
          <?php if ($error_postcode) { ?>
          <span class="error"><?php echo $error_postcode; ?></span>
          <?php } ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"> <span class="required">*</span> <?php echo $entry_country; ?></label>
        <div class="controls">
          <select name="country_id" onchange="$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=' + this.value + '&zone_id=<?php echo $zone_id; ?>');">
            <option value=""><?php echo $text_select; ?></option>
            <?php foreach ($countries as $country) { ?>
            <?php if ($country['country_id'] == $country_id) { ?>
            <option value="<?php echo $country['country_id']; ?>" selected="selected"><?php echo $country['name']; ?></option>
            <?php } else { ?>
            <option value="<?php echo $country['country_id']; ?>"><?php echo $country['name']; ?></option>
            <?php } ?>
            <?php } ?>
          </select>
          <?php if ($error_country) { ?>
          <span class="error"><?php echo $error_country; ?></span>
          <?php } ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"> <span class="required">*</span> <?php echo $entry_zone; ?></label>
        <div class="controls">
          <select name="zone_id">
          </select>
          <?php if ($error_zone) { ?>
          <span class="error"><?php echo $error_zone; ?></span>
          <?php } ?>
        </div>
      </div>
    </fieldset>
    
    <!-- 账户密码 -->
    <fieldset>
      <legend><?php echo $text_your_password; ?></legend>
      <div class="control-group">
        <label class="control-label"> <span class="required">*</span> <?php echo $entry_password; ?></label>
        <div class="controls">
          <input class="span2" type="password" name="password" value="<?php echo $password; ?>" />
          <?php if ($error_password) { ?>
          <span class="error"><?php echo $error_password; ?></span>
          <?php } ?>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label"><span class="required">*</span> <?php echo $entry_confirm; ?></label>
        <div class="controls">
          <input class="span2" type="password" name="confirm" value="<?php echo $confirm; ?>" />
          <?php if ($error_confirm) { ?>
          <span class="error"><?php echo $error_confirm; ?></span>
          <?php } ?>
        </div>
      </div>
    </fieldset>
    
    <!-- 订阅邮件-->
    <fieldset>
      <legend><?php echo $text_newsletter; ?></legend>
      <div class="control-group">
        <label class="control-label"> <?php echo $entry_newsletter; ?></label>
        <div class="controls">
          <?php if ($newsletter == 1) { ?>
          <label class="radio">
            <input type="radio" name="newsletter" value="1" checked="checked" />
            <?php echo $text_yes; ?></label>
          <label class="radio">
            <input type="radio" name="newsletter" value="0" />
            <?php echo $text_no; ?></label>
          <?php } else { ?>
          <label class="radio">
            <input type="radio" name="newsletter" value="1" />
            <?php echo $text_yes; ?></label>
          <label class="radio">
            <input type="radio" name="newsletter" value="0" checked="checked" />
            <?php echo $text_no; ?></label>
          <?php } ?>
        </div>
      </div>
    </fieldset>
    <?php if ($text_agree) { ?>
    <div class="buttons">
      <div class="well">
      <label class="checkbox">
        <?php if ($agree) { ?>
        <input type="checkbox" name="agree" value="1" checked="checked" />
        <?php } else { ?>
        <input type="checkbox" name="agree" value="1" />
        <?php } ?>
        <?php echo $text_agree; ?> </label></div>
      <div class="row pull-right">
        <input type="submit" value="<?php echo $button_continue; ?>" class="btn btn-primary btn-large span2 pull-right" />
      </div>
    </div>
    <?php } else { ?>
    <div class="buttons">
      <div class="right">
        <input type="submit" value="<?php echo $button_continue; ?>" class="btn btn-primary btn-large span2" />
      </div>
    </div>
    <?php } ?>
  </form>
  <?php echo $content_bottom; ?> </div>
<script type="text/javascript"><!--
$('select[name=\'zone_id\']').load('index.php?route=account/register/zone&country_id=<?php echo $country_id; ?>&zone_id=<?php echo $zone_id; ?>');
//--></script> 
<script type="text/javascript"><!--
$('.colorbox').colorbox({
	width: 560,
	height: 560
});
//--></script> 
<?php echo $footer; ?>